package com.leil.list;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class ListFilterDemo {

    public static void main(String[] args) {
        List<Integer> nums = Arrays.asList(3, 4, 90, 239, 100);
        List<Integer> filterNums = nums.stream().filter(num -> {
            // 过滤条件
            return num > 50;
        }).collect(Collectors.toList());

        filterNums.forEach(num -> {
            System.out.println(num);
        });
    }

}
